package sanshi.contect.singlet;

/**
 * 使用多线程测试懒汉式单例
 */
public class TestSingleton {
    public static void main(String[] args) {

        for (int i = 0; i < 100; i++) {
            new Thread(() ->
                 System.out.println(Singleton.getInstance().hashCode())
            ).start();
        }
    }


}
